//
//  SafeAreaBootcamp.swift
//  swiftUiTest
//
//  Created by Mac on 2023/6/29.
//

import SwiftUI

struct SafeAreaBootcamp_18: View {
    var body: some View {
//        ZStack {
//
//            Color.blue
//                .edgesIgnoringSafeArea(.all)
//
//            VStack {
//                Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
//                Spacer()
//
//            }
//            .frame(maxWidth: .infinity,maxHeight: .infinity)
//            .background(Color.green)
//            .edgesIgnoringSafeArea(.bottom)
//
//        }

        ZStack {
          
            
            ScrollView{
                Text("Title goes here")
                    .font(.largeTitle)
                    .frame(maxWidth:.infinity,alignment: .leading)
                
                ForEach(0..<10) { index in
                    RoundedRectangle(cornerRadius: 25.0)
                        .fill(Color.white)
                        .frame(height: 150)
                        .shadow(radius: 10)
                        .padding(20)
                }
            }
            .background(Color.red)
            .ignoresSafeArea(edges: .top)
        }
    }
}

struct SafeAreaBootcamp_Previews: PreviewProvider {
    static var previews: some View {
        SafeAreaBootcamp_18()
    }
}
